package com.controller;

import java.io.IOException;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.web.servlet.ModelAndView;

import com.Const;
import com.beans.User;
import com.controller.base.MultiMethodController;

public class MainController extends MultiMethodController {

	public ModelAndView getHome(HttpServletRequest request,
			HttpServletResponse response) throws IOException{
		User u=(User)request.getSession().getAttribute(Const.USER);
		if(u==null)response.sendRedirect(request.getContextPath());
		return new ModelAndView("home");
	}
	public ModelAndView getHead(HttpServletRequest request,
			HttpServletResponse response){
		return new ModelAndView("head");
	}
	public ModelAndView getWork(HttpServletRequest request,
			HttpServletResponse response){
		return new ModelAndView("work");
	}
	public ModelAndView getFoot(HttpServletRequest request,
			HttpServletResponse response){
		return new ModelAndView("foot");
	}
	public ModelAndView getConfig(HttpServletRequest request,
			HttpServletResponse response){
		return new ModelAndView("config");
	}
}
